package com.csglxt.service;

import java.util.List;
import java.util.Set;

import com.csglxt.base.DaoSupport;
import com.csglxt.domain.Goods;
import com.csglxt.domain.OrderItem;
import com.csglxt.domain.Storage;

/**
 * 
 * @ClassName: StorageService
 * @Description: TODO(库存管理 业务层 接口)
 * @author Itchbeilef
 * @date 2015-5-28 下午10:03:56
 * 
 */
public interface StorageService extends DaoSupport<Storage> {
    /**
     * 
     * @Title: queryStorageByGoods
     * @Description: TODO(根据 商品来查询库存 )
     * @param Goods
     *            商品
     * @return
     * @throws
     */
    public List<Storage> queryStorageByGoods(Goods goods);

    /**
     * 
     * @Title: UpGoodsNumbyOrderItem
     * @Description: TODO(跟据单据明细信息增加或者减少相对应商品在库存表里的数量)
     * @param item
     *            ：单据明细项 jia：增加或减少
     * @return
     * @throws
     */
    public int UpGoodsNumbyOrderItem(OrderItem item, boolean jia);

    /**
     * 
     * @Title: UpGoodsNumbyOrderItems
     * @Description: TODO((跟据单据明细集合信息增加或减少库存表对应商品数量)
     * @param items
     *            ：单据明细项信息集合 jia：增加或减少
     * @return
     * @throws
     */
    public int UpGoodsNumbyOrderItems(Set<OrderItem> items, boolean jia);

    /**
     * 
     * @Title: queryGoodsNumbygoodsid
     * @Description: TODO(根据 商品ID来查询商品 库存数)
     * @param Goodsid
     *            商品ID marketid 超市ID
     * @return
     * @throws
     */
    public int queryGoodsNumbygoodsid(String Goodsid);
}
